/**
 * 基础路由配置，主要包括移动端产品中，默认提供的功能所涉及到的路由
 */
export const basicRoutes = [
	// 默认路由
	{
		path: '/', 
		redirect: '/initApp' 
	},
	// 初始化应用
  {
		name: 'initApp',
		path: '/initApp',
		component: () => import ('@/pages/Init/InitApp.vue')
	},
	// 登录
	{
		name: 'login',
		path: '/login',
		component: () => import ('@/pages/Login/Login.vue') 
	},
	// 扫描绑定
	{
		name: 'loginScan',
		path: '/loginScan',
		component: () => import ('@/pages/Login/LoginScan.vue') ,
		props($route) {
			return {
				userId: $route.query.userId
			}
		},
	},
	// 首页
	{
		name: 'index',
		path: '/index',
		component: () => import ('@/pages/Index/Index.vue') 
	},
	// 我的
	{
		name: 'mine',
		path: '/mine',
		component: () => import ('@/pages/Mine/Mine.vue') 
	},
	// 事项跟踪
	{
		name: 'todo',
		path: '/todo',
		component: () => import('@/pages/Index/Todo.vue')
	},
	// 菜单
	{
		name: 'menu',
		path: '/menu',
		component: () => import('@/pages/Index/Menu.vue')
	},
	// 消息
	{
		name: 'message',
		path: '/message',
		component: () => import('@/pages/Message/Message.vue'),
		props($route) {
			return {
				id: $route.query.id
			}
		},
		redirect:'/message/report',
		children: [
			{
				name: '通知公告',
				path: 'report',
			  component: () => import('@/pages/Message/MessageReport.vue')
			},
			{
				name: '论文网络推送',
				path: 'paperSent',
			  component: () => import('@/pages/Message/MessagePaperSent.vue')
			}
		]
	},
	// 通知公告
	{
		name: 'MessageReport',
		path: '/messageReport',
		component: () => import('@/pages/Message/MessageReport.vue')
	},
	// 通知公告详情
	{
		name: 'MessageReportDetail',
		path: '/messageReportDetail',
		component: () => import('@/pages/Message/MessageReportDetail.vue')
	},
	// 论文网推
	{
		name: 'MessagePaperSent',
		path: '/messagePaperSent',
		component: () => import('@/pages/Message/MessagePaperSent.vue')
	},
	// 论文网推详情
	{
		name: 'messagePaperDetail',
		path: '/messagePaperDetail',
		component: () => import('@/pages/Message/MessagePaperDetail.vue')
	},

	// 统计分析报表
	{
		name: 'analyze',
		path: '/analyze',
		component: () => import('@/pages/Analyze/testAnalyze.vue')
	},

	// 审核详情
	{
		name: 'audit',
		path: '/audit',
		component: () => import('@/pages/Audit/Audit.vue'),
		props($route) {
			return {
				id: $route.query.id,
				beanId: $route.query.beanId,
				checkstatus: $route.query.checkstatus
			}
		}
	},

	// 审核日志
	{
		name: 'auditLog',
		path: '/auditLog',
		component: () => import('@/pages/Audit/AuditLog.vue'),
		props($route) {
			return {
				id: $route.query.id,
				beanId: $route.query.beanId,
				checkstatus: $route.query.checkstatus
			}
		}
	}
]